#ifndef QSERVERDRIVERLISTERN_H
#define QSERVERDRIVERLISTERN_H

#include "../devicelibglobal.h"

#include <QObject>
#include <QMap>

struct tagDriverProperty
{
    QString     m_name;
    QString     m_value;
};

struct QDriverInfo
{
public:
    QList<tagDriverProperty>        m_propertys;
    QString                         m_uuid;
};

class DEVICELIB_EXPORT QServerDriverListern : public QObject
{
    Q_OBJECT
public:
    explicit QServerDriverListern(QObject *parent = 0);
    
    void    add_driver(const QDriverInfo& info);

    void    add_data(const QString &message);

    void    update_driver();

    QList<QDriverInfo>  get_drivers();
signals:
    void    add_data_signals(const QString &message);
    void    update_driver_signals();
public slots:
protected:
    QList<QDriverInfo>   m_drivers;
};

#endif // QSERVERDRIVERLISTERN_H
